Skip to content

Conversation

@d-oit
Copy link
Contributor

@d-oit d-oit commented Apr 26, 2025

Context

In the MODES section, each mode is listed with:

A display name (e.g., "🧠 Auto-Coder" mode)

A mode_slug in parentheses (e.g., (code))

However, when calling tools:

switch_mode expects the mode_slug (e.g., "code", "ask", "architect").

new_task was previously using a parameter named mode, but it actually expected the mode_slug too — not the display name — leading to unnecessary confusion.

Because of this mismatch, some calls to switch_mode were incorrectly passing display names instead of slugs, resulting in silent failures.

👉 Fix: Standardize all references to use mode_slug across the tools. Ensure only slugs like "code", "ask", and "architect" are passed — never the display name.

Implementation


Version: 3.14.3
default prompt: orchestrator

new_task

Description: Create a new task with a specified starting mode and initial message. This tool instructs the system to create a new Cline instance in the given mode with the provided message.

Parameters:

  • mode: (required) The slug of the mode to start the new task in (e.g., "code", "ask", "architect").
  • message: (required) The initial user message or instructions for this new task.

Usage:
<new_task>
your-mode-slug-here
Your initial instructions here
</new_task>

Example:
<new_task>
code
Implement a new feature for the application.
</new_task>


Fix parameter naming inconsistency in new_task tool

This PR changes the parameter name from mode to mode_slug in the new_task tool definition to maintain consistency with other mode-related tools like switch_mode. This change clarifies that the expected value is the internal mode identifier (slug) rather than the display name, reducing potential confusion for users. The functional behavior remains unchanged

Screenshots

before after

How to Test

  • UI "Prompts" check changes in "Preview"
  • Test with sparc new_task which should switch a mode.

Get in Touch

discord: d-oit


Important

Renames mode to mode_slug in new_task tool for consistency with switch_mode, ensuring only mode slugs are used.

  • Parameter Renaming:
    • Change mode to mode_slug in getNewTaskDescription() in new-task.ts.
    • Update usage examples in system.test.ts.snap to reflect mode_slug.
  • Consistency:
    • Ensures new_task tool uses mode_slug consistently with switch_mode tool.
    • Prevents confusion by standardizing on mode slugs (e.g., "code", "ask", "architect").

This description was created by Ellipsis for bc33ccf. You can customize this summary. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Apr 26, 2025

⚠️ No Changeset found

Latest commit: bc33ccf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@d-oit
Copy link
Contributor Author

d-oit commented Apr 26, 2025

@ellipsis-dev review this

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 3e56f86 in 52 seconds. Click for details.
  • Reviewed 26 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/core/prompts/tools/new-task.ts:8
  • Draft comment:
    Good update: the parameter has been renamed from mode to mode_slug for consistency, reducing confusion with display names. Please ensure all parts of the system referencing this tool are updated accordingly.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 40% <= threshold 70% The comment is asking the PR author to ensure that all parts of the system referencing the tool are updated, which violates the rule against asking the author to ensure things. However, it does mention the reason for the change, which is consistency and reducing confusion, which is useful information. The comment could be rephrased to focus on the consistency aspect without asking the author to ensure updates.
2. src/core/prompts/tools/new-task.ts:8
  • Draft comment:
    Renamed parameter to 'mode_slug' improves clarity by specifying an internal identifier. Ensure any tests, documentation, or related tools referencing the old name are also updated accordingly.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 70% None
3. src/core/prompts/tools/new-task.ts:13
  • Draft comment:
    Usage instructions now consistently use '<mode_slug>' which aligns with the updated parameter name. Verify that all invocations (e.g., in switch_mode) utilize this change to prevent silent failures.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 70% None

Workflow ID: wflow_MVLJ5lIWwr0vhGBK

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@d-oit
Copy link
Contributor Author

d-oit commented Apr 26, 2025

Hey @ellipsis-dev, the snapshot for SYSTEM_PROMPT should maintain consistent system prompt is failing in system.test.ts. Can you update the snapshot or fix the code so the test passes?

ellipsis-dev bot added a commit that referenced this pull request Apr 26, 2025
… in new task description for consistency);
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Apr 26, 2025

@d-oit, I have addressed your comments in pull request #2973


You can configure Ellipsis to address comments with a direct commit or a side PR, see docs.

@d-oit d-oit marked this pull request as ready for review April 26, 2025 20:38
@d-oit d-oit requested review from cte and mrubens as code owners April 26, 2025 20:38
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 26, 2025
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, though we also need to update the handler code for these different tools I think? And probably need to continue to handle the old mode param for backwards compatibility.

@d-oit
Copy link
Contributor Author

d-oit commented Apr 28, 2025

I will check this again in a fresh gh codespace.

It was working without changing the handler in my local debug session.

@d-oit d-oit marked this pull request as draft April 28, 2025 15:51
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Apr 28, 2025
@hannesrudolph hannesrudolph moved this from PR [Pre Approval Review] to PR [Draft/WIP] in Roo Code Roadmap May 10, 2025
@d-oit d-oit closed this May 17, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft/WIP] to Done in Roo Code Roadmap May 17, 2025
@hannesrudolph hannesrudolph moved this from New to Done in Roo Code Roadmap May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants